perm filename MF84.BUG[MF,DEK]1 blob sn#757955 filedate 1984-06-15 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00025 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00003 00002	(rough list of bugs found in MF after it passed syntax check)
C00005 00003	Version -98.0: [March 28]
C00007 00004	Version -97.0: [March 29]
C00010 00005	Version -96.0: [March 30]
C00014 00006	Version -95.0: [April 1]
C00017 00007	Version -94.0: [April 4]
C00019 00008	Version -90.0: [April 5]
C00020 00009	Version -89.0: [April 6]
C00021 00010	Version -88.0: [April 7]
C00022 00011	Version -87.0: [April 13]
C00024 00012	Version -86.0: [April 25]
C00026 00013	Version -85.0: [May 2]
C00028 00014	Version -80.0: [May 4]
C00030 00015	Version -79.0: [May 6]
C00032 00016	Version -70.0: [May 9]
C00033 00017	Version -69.0: [May 10]
C00035 00018	Version -67.0: [May 17]
C00036 00019	Version -66.0: [May 19]
C00038 00020	Version -65.0: [May 24]
C00039 00021	Version -60.0: [May 25]
C00040 00022	Version -59.0: [May 27]
C00041 00023	Version -58.0: [May 28]
C00043 00024	Version -57.0: [June 4]
C00044 00025	Version -56.0: [June 6]
C00049 ENDMK
C⊗;
(rough list of bugs found in MF after it passed syntax check)
Version -100.0: [Mar 27, first run, about 00:30]
1. fix_date_and_time was badly patched in INIMF.
2. cur_tok function forgot "cur_tok←p" at the end; PASCAL doesn't catch that.
3. "multiletter control sequences" msgs should say "symbolic tokens".
Version -99.0: [still Mar 27, done while waiting for WEAVE/TeX output]
4. do_statement should initialize cur_type←vacuous.
5. find_variable has misplaced p←equiv(p).
6. one-character primitives shouldn't decrease str_ptr.
7. clear_symbol had "q" at end where I meant to say "p".
8. help message for extra token flushing improved.
9. "buffer[k]" should be "buffer[j]" for 1-character id_lookup.
10. def_delims forgot to get_next afterwards.
11. type_command at beginning of statement wasn't diverted.
12. menu always came out after help message.
13. forgot to return after getting num/str token from token list.
Version -98.0: [March 28]
14. scan_declared_variable flushes too much.
15. ordered pairs: one level of indirection was forgotten.
16. type declarations must add "unknown" bit.
17. semicolon+ added to do_statement cases.
18. base_ident should get max_str_ref.
19. "internal[...]" missing in date for base_ident.
20. do_binary(p,c) should be do_binary(p,d) after continue_path
21. in scan_def after get_clear_symbol I need to get_next.
22. get_next needed at end of scan_def.
23. get_next needed at end of mode_command processing.
24. randomseed missing error typo: `;' for `:='.
25. print_nl("") at beginning of show.
26. refcounts on macro calls were incremented twice.
27. forgot to advance loc after getting num/str token from token list.
28. "/" has the wrong command code.
29. get_x_next needed after, e.g., "1/2" in scan_primary.
30. take_fraction should be make_fraction in call of frac_mult.
31. v:=dep_list(v) forgotten in dep+dep branch of add_or_subtract.
32. q:=link(q) etc misplaced and omitted in p_plus_fq and p_plus_q.
33. dep_finish recycled a dependency list twice.
34. call of dep_finish should use null not cur_exp.
35. decided that "3 3" shouldn't equal 9.
[also put in new code for the addto command]
Version -97.0: [March 29]
36. forget to set q:=qq in scan_expression.
37. first line of print_path: forgot print_ln.
38. typo in set_controls: right_y should be left_y.
39. toss_knot_list forgot that it has a circular list to toss.
40. print_exp shows big nodes backwards.
41. angle brackets didn't look good in print_exp; took them out.
42. left_brace must be between min_tertiary and max_tertiary.
43. prev_dep should point back to tail, not head, of previous list.
	(that error was in encapsulate and <Copy the big node>)
44. nonlinear_eq should leave node p vacant, sometimes.
45. conditional routine forgot that get_boolean starts with get_x_next.
46. forgot get_x_next in processing of else.
47. str_ref not initialized by make_string.
48. param_start not initialized properly.
49. "%EXPR" didn't look good in token list.
50. "{loop}" not necessary in forever loops; there's already enough.
51. macro name didn't come out right when tracing macros.
52. macro parameters weren't shown when tracing macros.
53. quote marks missing when displaying strings.
54. parameter names on macro call trace should look nicer.
55. statement beginning with bad token: error message needed.
56. `->' desired in context lines of macro.
57. forgot q:=loop_list_loc(s) in begin_iteration.
[also put in new code for shipout]
Version -96.0: [March 30]
58. forgot loop_type(s):=null in begin_iteration.
59. forgot value(p)←null after type(p)←type(pp) in find_variable.
60. forgot to delete_pen_ref after filling a contour.
61. check that it's a cycle before calling make_spec.
62. "if tracing_stats>0" should be "if internal[tracing_stats]>0"!
63. forgot get_next after showdependencies.
64. forgot link(r):=p at end of dependency list addition.
65. extra `get_x_next' in <Scan a direction...>.
66. typos in last half of <Remove open types...>: mind the p's and q's.
67. take_fraction should be make_fraction in simple case of two givens.
68. in print_exp of unknown type, stop if v=null.
69. showtoken forgot to stop; also should be consistent with TeX.
70. "continue" label needed in error routine, after all.
71. id_lookup should treat length-one identifiers by simpler method.
	(in particular, this allows it to find unprintable ones!)
72. need psi[n+1]:=psi[1] in cyclic case of make_choices.
73. tension/controls take primaries as arguments, not expressions.
74. print_spec didn't initialize octant.
75. print_spec: break lines into two, since they are quite long.
76. smooth_moves not called in fill_spec.
77. typo < for > in edge_prep.
78. edge tracing misses half the corners, and forgot to set trace_y.
79. edge_prep needs extra logic when rover=head.
80. make_good should compute cur_d based on good values, not original values;
	but we sometimes need the other alternative too.
81. valid_sum: the test was backwards.
82. print_weight blunder: ho(q) should be ho(info(q)).
83. forgot init_gf in shipout.
84. typo in <Finish the GF file>: if total_chars≠1 then print("s").
85. initializations of ww, prev_w, and m were forgotten in ship_out.
86. typos in initialization of prev_m and gf_min_x.
87. forgot to update prev_n in ship_out.
88. relax becomes "expandable".
89. internal[x]>1 should be internal[x]>unity!
90. forgot to restore normal scanner_status in pass_text.
91. (end occurred when if...) was inevitable.
[also put in new code for openwindow, display]
Version -95.0: [April 1]
92. forgot to unscale the window numbers in that new code.
93. had w<0 test instead of w<=0 in <Record a possible transition...>.
94. prev_w←w should be done in all cases of <Record a possible...>.
95. forgot get_x_next after scanning `1/2'.
96. in do_assignment, after recycle_value(p) I need to set type(p)←something.
97. omit `.' after the equivalent in showtoken.
98. in <Copy the big node p>, I said "until q=p"; I meant "until q=value(p)".
99. print_macro_name said "info(link(a))"; meant "text(info(info(link(a))))".
100. forgot get_x_next after macro_call in scan_primary.
101. scan_primary installed dependent components badly (data structure error).
102. new_structure failed in case of generic_subscript (data structure error).
103. param_type case of print_cmd_mod had bad if/else nesting (language error).
104. null_path forgot to return a value (language error).
105. p_with_x_becoming_q had typos (q and f for x).
106. <Copy the big node...> should end with cur_exp←t, not r.
107. subscripted definitions: out of sync; scan_primary loop needs revision.
108. secondarydef went through scan_def instead of make_op_def.
109. make_op_def forgot the final get_next.
110. make_op_def also forgot to insert the general_macro preface.
111. showvar shows too much of macro variables.
Version -94.0: [April 4]
112. single_dependency needs to take account of the scale factor.
113. add_or_subtract starts out with wrong v value. [bug 31 was fixed wrong]
114. print_exp needs a case for t=independent.
115. also numeric_type, and case v=null of pair_type, transform_type.
116. end_token_list thought identity_macro and insertions had ref counts.
117. disp_var should display also in case of generic subscripts.
118. find_var should put value(pp):=null when it sets type(pp):=numeric_type.
119. yet another problem in <Copy the big...>: copy_dep_list(dep_list(q)).
120. scan_primary should flush_node_list(q) before make_exp_copy(p).
121. make_scaled arguments reversed in p_over_v.
[also added code for new internals: smoothing, autorounding]
[also added code for showstats]
Version -90.0: [April 5]
122. Should check range of variables when they become known.
123. <Exclaim about...> should include begin...end (WEB language error).
124. forever should be followed by a colon.
125. dangling else problem in make_eq: "abc"="abc" considered false.
126. showstats, showtoken should read the semicolon before stopping.
127. print_variable_name balked at, e.g., xpart of a capsule.
Version -89.0: [April 6]
128. after &foo, shouldn't assume there's an input file present.
129. forever forgot get_next.
130. pair=path and path=pair should coerce the pair to be a path.
131. similarly in the operand to `addto'.
[added new code for cull command]
[minor revision of internal quantities; e.g., labeling is out, fontmaking is in]
Version -88.0: [April 7]
132. "string" operator is renamed "str".
133. min/max coordinates added to boc command.
134. labeling_command removed; it will be implemented in macros.
135. info(p) should be attr_loc(p) in flush_variable.
136. make_spec didn't realize the need for xh and yh.
137. gf_new_row parameters had sign reversed.
138. the "numeric" case was left out of recycle_value.
[added new code for special/numspecial]
Version -87.0: [April 13]
139. q:=qq should apply also after <Splice...>, in scan_expr.
140. param_size: better defined than a constant.
141. surprise: back_input fails when cur_cmd=expr_arg, as it changes limit.
142. <Subdivide...second time wrt x'-y'> forgot to change right_type(r).
143. show <path> shows the whole path.
144. expr like 0..1 leads to <Determine the path join...> with q undefined.
145. typos in <Decide...clockwise>, clobbered dx2 and used right_type(p) twice.
146. need to adjust expr_arg when macro is inside a macro!
147. expr_arg forbidden to be in a text argument.
148. frozen_relax added to prevent premature termination.
[I took out the code used for debugging the screen interface]
[added "cycle", a unary operator taking path to boolean]
[added the code for concatenation and for str and for xpart..yypart]
Version -86.0: [April 25]
149. not_scolded_yet was never set false after scolding.
150. Missing "q:=s" at the end of <Make variable q known>.
151. In @<Worry...@>, add get_next after back_error.
152. New xpart routine didn't recycle other components of the big node.
[added the "hard_times" case of multiplication]
[added the complete set of boolean expressions]
[added the eight transformations, applied to three kinds of expressions]
[added the save command]
[added the interim command]
[added the let command]
[added the pen operations]
153. Incomplete help message on "Not a variable".
154. forgot begin...end in the last section of materialize_pen.
155. blunder <Insert a new line...>: length(p,s,q) should be length(s,q,r).
156. <Construct the offset...>: forgot begin...end here too.
157. "(newly created)" shd be " (newly created)".
158. path_trans: forgot to unstash the capsule p.
159. set_up_trans: transform_type should be transformed_by, in one place.
160. <Install sines...>: had p instead of q, in several places.
161. edges_trans: an edges variable isn't in a capsule.
Version -85.0: [May 2]
162. begingroup ... endgroup should be allowed as compound statement.
163. pausing shouldn't clobber "showit". (WAITS version only)
164. Improved help message for isolated expressions.
165. Bad error recovery after "Not a variable" in showvar.
166. Typo in clear_symbol: name_type(p) instead of name_type(q).
167. "%" and ";" to be left out of file names being input.
168. dep_finish used v for two purposes; wrong declared type.
169. autorounding 2 suppresses correction when the derivative isn't critical.
170. tab characters should be changed to spaces on input. (WAITS version)
171. harmful goto: Forgot to |return| after path_trans and edge_trans.
[added ord, hex, oct, length, char, decimal, and jobname]
Version -80.0: [May 4]
172. showvar still screwed up.
173. don't clobber screen for prompt_input (WAITS only).
174. length of non-cyclic path is one too high.
175. <Evoke an error message...> evoked the wrong message.
176. better error message needed on `Equation cannot be performed'.
177. ">> " inserted before expression displays.
178. <Finish linking...> should dup_offset also when n=0.
179. pencircle was a factor of 2 too big.
180. cosine of 180 should be -1 exactly.
181. ord "" should be -1.
182. shipout should allow expressions as well as variables.
183. "mod outer_tag" needed in various tests on eq_type.
184. merge_edges forgot to adjust for changes in m_offsets.
185. typo, ww for w in print_pen.
186. typo, "outer" for "errhelp" in print_cmd_mod (message case).
[added "also"]
[added "message", "errmessage", "errhelp"]
[added "outer", "inner"]
[added "readterminal", "readstring"]
Version -79.0: [May 6]
187. read_toks forgot to include the general_macro token.
188. offset_prep should treat n=0 like n=1.
189. cusp transitions (from change 169) must be suppressed in envelope case.
190. <Record a line segment...> shouldn't change xp or yp.
191. <Find the initial slope...> was used too late.
192. <Find the index...> had a redundant test (a relic of old code).
193. <Compute test coeff...> wastefully made the same fraction three times.
194. doublepath <cycle> should split the cycle.
195. `if k=0' in fin_offset_prep should have been `if k=1'.
196. `done:' misplaced in <Make the envelope moves...>.
197. also move[move_ptr] should be initialized to 1 there, not 0.
198. skew is used with p=q in fill_envelope.
199. it's no use tracing subdivision for offsets, since everything is skewed.
200. in <Record a line...>, round_unscaled should be floor_unscaled.
201. unskewing: wrong formula (x was .5 too large).
202. elliptical pens: better correction for the case gamma<=abs(alpha).
203. dual env_move was updated badly, in both <Transfer...> and <Record...>.
204. dual env_move to move: subscripts were off by 1.
205. <Insert...dually...> should set ww←knil(link(h)), not link(h).
[added ++]
Version -70.0: [May 9]
206. suppressed cusp rounding in envelope case too.
207. `show' should use `>> ' when it shows an expression.
208. streamlined the test for bad lambda and mu in |skew|.
209. after linear_eq, must check if type(cur_exp)=known.
210. print_spec surprise: contours might never travel toward the first octant!
211. t0,t1,t2 sign was reversed in <Complete the offset splitting...>.
Version -69.0: [May 10]
212. "showvar" changed to "showvariable".
213. typo: r for r_delim in <Scan a text parameter...>.
214. "newinternal" feature added.
215. <Record a line...dually...> needs to update envmove at end of loop.
216. smooth_moves shouldn't affect the extreme points.
217. floor(unity*(n-1)/n) is unity when n is large; need to be more careful.
218. major improvements to rounding, based on new theory of (x+eps,y+eps↑2).
219. pen offsets made symmetrical about the origin.
220. p←half(p+q) overflow problem in take_fraction, take_scaled.
221. cull_edges now updates the max/min values too.
222. make_spec needs to be more bullet-proof to rounding errors; added `dest's.
223. xmult/ymult/zmult changed to xscaled/yscaled/zscaled.
224. elliptical pens improved by temporarily allowing zero-length lines.
[added edge transposition algorithm]
Version -67.0: [May 17]
225. copy can encounter a vacuous expression, e.g. in a parameter.
226. xy_swap_edges mustn't change w when inserting a large weight.
227. in #222, had typo pp for r in <split ... second time ... x'-y'>.
228. in #222, incorrectly assumed local max = global max of cubic.
Version -66.0: [May 19]
229. bad_binary(c,p) should have been bad_binary(p,c).
230. enabled comparison of unknown strings.
231. fixed ring_delete to avoid unexpected scolding.
232. should store character width info even when proofing<0.
[added all the TFM commands and output routines]
[added the `substring' operation]
[added `point', `precontrol', `postcontrol'; deleted `direction']
Version -65.0: [May 24]
233. Change error message `(t)point(u)' to `point(t)of(u)'.
234. newinternal to allow a list of tokens.
235. In <Feed...>, should check for overflow before begin_token_list.
236. scan_def didn't allow for the case warning_info=null.
Version -60.0: [May 25]
237. increased param_size.
238. added <boolean><relation><boolean>.
239. <Remove dead cubics> stopped too early if the first cubic was dead.
240. bad_unary, bad_binary should distinguish pair from unknown pair.
241. yet another "m<env_move[move_ptr]" test needs to be inserted.
242. newinternal names need to go in the dump file.
243. delete_mac_ref(v) should be delete_mac_ref(value(p)) in recycle_value.
244. constant in <Decide...clockwise> was scaled instead of fraction.
Version -59.0: [May 27]
245. break up initialize routine into two parts (cf init_prim in TeX)
Version -58.0: [May 28]
246. do_ship_out should scan_expression, not scan_primary.
247. offset_prep might clobber node q, so we need to search for q again.
248. pair "1" = true! (blunder in type_test)
249. allow strings x in `def f(expr x)=def g=x enddef enddef'.
250. allow exprs in text parameters, in sufficiently easy cases.
251. check right delimiters in macro_call.
252. "Bad window number" message gave unscaled value.
253. turnaround feature improves automatic rounding slightly.
254. primaries changed to expressions in window and cull commands.
255. scan_expression should make (0,0){0,0} a path, not a future path.
256. showvariable and showtoken to allow lists; all shows made consistent.
257. new internal quantity "windingcheck".
258. delete warning message about edges never used.
259. vardef: group the righthand side.
260. show commands stop once each.
261. cur_type should be vacuous after equation or assignment on outer level.
Version -57.0: [June 4]
262. added xyzzy diagnostic about effect of autorounding.
263. make_moves now puts xi_corr,eta_corr into halving.
[otherwise "draw (0,0)..(9,-.00002)" and "draw (0,-.00002)..(9,0)" fail badly!]
Version -56.0: [June 6]
*264. make_spec octants to be more likely +4 under negation
*265. fix smoothing to be LR symmetric (e.g. 1324 → 1234)
Note: the first two draw statements in PENS.mf show an interesting effect.
With autorounding, the curves are noticeably better, esp the small one.
But there are two "holes", because of tiny discrepancies that I believe
are unavoidable.

∂11-Jun-84  1854	JDH  	Filling envelopes  
The following MF program (adapted from your PENS.MF) has a missing
pixel problem that I don't believe we've discussed before.

    tracingall;
    draw ((8,10){-1,-10}..bounded..(8,0){1,0}) scaled 20
	 withpen pencircle scaled 10;
    end


Here is the relevant portion of the .log file:


@ Octant 4 (2 offsets), from (164,3) to (160.20488,4.69757)
@@ with autorounding: from (164,3) to (159.99998,4.50002)
@ transition line 3, from (164,3) to (163,4)
@ transition line 2, from (163,4) to (161,5)
@ transition line 1, from (158.26567,5.58589) to (160.26567,4.58589)
@ transition line 2, from (158.99998,5.50002) to (156.99998,6.50002) % ****
@ transition line 1, from (156.99998,6.50002) to (156.99998,6.50002) % NULL
(164,4)(162,4)(162,5)(159,5)(159,6)(157,6)
@ retrograde line from (156.99998,6.50002) to (159.99998,4.50002)
(157,7)(157,6)(159,6)
@ Octant 3 (2 offsets), from (160.20488,4.69757) to (153.92906,48.89316)
@@ with autorounding: from (159.99998,4.50002) to (154,48.89316)
@ retrograde line from (159.99998,4.50002) to (160.99998,2.50002)    % ****
(159,5)(160,5)(160,4)(161,4)
@ transition line 0, from (160.99998,2.50002) to (160.99998,2.50002) % NULL
@ transition line 1, from (160.99998,2.50002) to (159.99998,4.50002) % ****


The lines that I have marked with *'s are pen edges of slope -1/2 and -2
that do not belong here since the octant transition happens at slope -1.
(Or at least the actual convolution of pen and trajectory does not do this
and I can't imagine why MF should.)

Anyway the last two lines marked (which ideally should cancel each other out)
both pass very close to (160.5,3.5) and their digitizations differ in such
a way as to leave the pixel centered there white.